
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="en" class="no-js">
<head>
  <meta charset="utf-8">
  <title>Fullscreen Login</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="description" content="">
  <meta name="author" content="">
  <!-- CSS -->
  <link rel='stylesheet' href='http://fonts.googleapis.com/css?family=PT+Sans:400,700'>
  <link rel="stylesheet" href="assets/css/reset.css">
  <link rel="stylesheet" href="assets/css/supersized.css">
  <link rel="stylesheet" href="assets/css/style.css">
  <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
  <!--[if lt IE 9]>
  <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
  <![endif]-->
  <style type="text/css">
  </style>

    <script type="text/javascript">
        function changeImage() {
            document.getElementById("img").src = "${pageContext.request.contextPath}/imageCode.action?time="
                + new Date().getTime();
        }
    </script>
    <%
           String username = "";
           String password = "";
            //获取当前站点的所有Cookie
            Cookie[] cookies = request.getCookies();
        for (int i = 0; i < cookies.length; i++) {//对cookies中的数据进行遍历，找到用户名、密码的数据
                if ("username".equals(cookies[i].getName())) {
                        username = cookies[i].getValue();
                    } else if ("password".equals(cookies[i].getName())) {
                         password = cookies[i].getValue();
                    }
            }
        %>
</head>
<body>
<div class="page-container">
  <h1>Thxy food network</h1>
  <br>
  <br>
 <div ><span style="color: #FF0000">${user_msg}</span></div><!-- 登录失败进行提示 -->
  <form action="${pageContext.request.contextPath}/loginController.action" method="post">
    <input type="text" name="username" class="username" placeholder="Username" value="<%= username%>"><br/>
      <span style="color: #FF0000">${login_msg}</span>
    <input type="password" name="password" class="password" placeholder="Password" value="<%= password%>"><br/>
      <input type="text" class="textinput" name="ckcode" placeholder="verification code"/><br/><br/>
      <span style="color: #FF0000">${ckcode_msg}</span>
     <div style="padding-top: 30px"> <td colspan="2" style="width:50%"><img
              src="${pageContext.request.contextPath}/imageCode.action" width="180"
              height="30" class="textinput" id="img" />&nbsp;&nbsp;
          <a href="javascript:void(0);" onclick="changeImage()" style="color: #afd1f3;text-decoration: none">看不清换一张</a>
         <div style="padding-right: 200px"><input type="checkbox" checked="checked" name="remember" style="width: 18px;height: 18px">&nbsp;&nbsp;&nbsp;<span style="color: #afd1f3">保存密码</span></div>
     </td></div>
    <button type="submit">login</button>
  </form>
  <div class="connect">
  </div>
</div>
<!-- Javascript -->
<script src="assets/js/jquery-1.8.2.min.js"></script>
<script src="assets/js/supersized.3.2.7.min.js"></script>
<script src="assets/js/supersized-init.js"></script>
<script src="assets/js/scripts.js"></script>
</body>
</html>

